<%--
    Document   : listarUsuario
    Created on : 18/09/2009, 16:00:19
    Author     : fabricio
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="../css/default.css" type="text/css" rel="stylesheet" >
        <link href="../css/style.css" type="text/css" rel="stylesheet" />
        <title>${titulo}</title>
    </head>
    <body>

        <div id="container">

            <!-- importa o header para a página -->
            <jsp:include page="../header.jsp" />
            <jsp:include page="../menuSuperior.jsp" />

            <div id="main">

                <div id="content">
                    <table>
                        <tr>
                            <td class="tdListaTitulo">Id</td>
                            <td class="tdListaTitulo">Nome</td>
                            <td class="tdListaTitulo">Nick Name</td>
                            <td class="tdListaTitulo">Email</td>
                            <td class="tdListaTitulo">Senha</td>
                            <td class="tdListaTitulo">Grupo</td>
                            <td class="tdListaTitulo">Deletar</td>
                        </tr>


                        <form action="FrontController?action=ApagarUsuario" method="post">
                            <c:forEach items="${usuarios}" var="usuario" begin="0">

                                <tr>
                                    <td class="tdLista">${usuario.id}</td>
                                    <td class="tdLista">${usuario.nome}</td>
                                    <td class="tdLista">${usuario.nickName}</td>
                                    <td class="tdLista">${usuario.email}</td>
                                    <td class="tdLista">${usuario.senha}</td>
                                    <td class="tdLista">${usuario.role.role}</td>
                                    <td class="tdLista"><input name="id" type="radio" value="${usuario.id}" /></td>
                                </tr>

                            </c:forEach>

                            <tr>
                                <td colspan="6"></td>
                                <td>
                                    <br />
                                    <input type="submit" value="Deletar" name="id"/>
                                </td>
                            </tr>
                        </form>
                    </table>
                </div>

                <!-- importa o menu para a página -->
                <jsp:include page="../menu.jsp" />

            </div>
        </div>
        <div class="clear"></div>
        <div id="footer">
            <p>&copy; Trabalho 7o Per&iacute;odo<br /><a href="http://gregdev.net">Designed by Greg Smith</a></p>
        </div>
        <hr size="1px" />
    </body>
</html>

